<template>
	 <view class="container">
	     <view class="article-header">
	       <text class="title">{{seek.seekName}}</text>
		   
	       <text class="date">{{seek.createTime}}</text>
	     </view>
		  <text class="author">{{seek.seekSubName}}</text>
		 <view class="article-footer">
		   <text class="author">作者：{{seek.seekAuth}}</text>
		 </view>
		 
	    <view class="article-content">
	       <div v-html="seek.seekContent">
			   
		   </div>
	     </view>
	     
	   </view>
</template>

<script>
	export default {
		data() {
			return {
				type:'',
				seek:{},
				seekId:''
			}
		},
		onLoad(e) {
			console.log(e)
			if(e.type){
				this.type=e.type;
				this.initSeek();
			}
			if(e.seekId){
				this.seekId=e.seekId;
				this.getSeekById()
			}
			
		},
		methods: {
			initSeek(){
				this.$request.get('seek/getByType/'+this.type).then(res => {
				  let data=  res.data;
				  this.seek=data;
				})
			},
			getSeekById(){
				this.$request.get('seek/getSeekById/'+this.seekId ).then(res => {
					if(res.code ==200){
						this.seek=res.data;
						 
					}
				 }).catch(res => {
					 
				})
			}
		}
	}
</script>

<style>
.container {
  padding: 15px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}
.article-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.title {
  font-size: 18px;
  font-weight: bold;
}
.date {
  color: #999;
}
.article-content {
  /* 根据需要添加样式 */
}
.article-footer {
  margin-top: 10px;
  color: #999;
}
.author {
  /* 根据需要添加样式 */
}
</style>
